# coding=utf-8
from __future__ import print_function
from django import forms
from django.forms import ModelForm
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.utils.translation import gettext as _

from recite.models import *


class LevelUserForm(forms.ModelForm):

    user = forms.ModelChoiceField(queryset=User.objects.all())

    class Meta:
        model = LevelUser
        fields = ['level', 'user', 'nums']


class WordExampleForm(forms.ModelForm):
    isshare = forms.IntegerField(required=False)

    class Meta:
        model = WordExample
        fields = ['user', 'word', 'annotation', 'translation', 'isshare']


class WordNotesForm(forms.ModelForm):
    isshare = forms.IntegerField(required=False)

    class Meta:
        model = WordNotes
        fields = ['user', 'word', 'notes', 'isshare']
